package cn.antho.shop.feign;

import cn.antho.shop.domain.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

@FeignClient("service-store")
public interface ProductService {

    @PostMapping("/product/save")
    void update(@RequestBody Product product);

    @GetMapping("/product/getByProductId/{pid}")
    Product getByProductId(@PathVariable("pid") Long pid);
}
